import request from "@/utils/request"

// 退款单列表
export const getRefundList = (data) => {
  return request({
    url: "/order/refund/list",
    method: "post",
    data,
  })
}

// 退换货列表
export const getExchangeList = (data) => {
  return request({
    url: "/order/exchange/list",
    method: "post",
    data,
  })
}

// 根据平台订单号和系统订单号，查询售后数据
export const crmOrderPost = (params) => {
  return request({
    baseURL: window.APP_GETEWAY.crm,
    url: "/v1/order-post",
    // url: `/v1/order-post?order_sn=${params.order_sn}`,
    method: "get",
    params,
  })
}

export const apiMailReceivedDetail = (params) => {
  return request({
    baseURL: window.APP_GETEWAY.crm,
    url: "/v1/mail-received/detail",
    method: "get",
    params,
  })
}

export const importFilepath = (params) => {
  return request({
    url: `/import/filepath`,
    method: "get",
    params,
  })
}
